import { RJSFSchema, UiSchema } from '@rjsf/utils';
import { RadioButtonFields } from '../cmd-common/radioButtonFields';
import { PlaneEnum } from '../cmd-common/base';

export enum State {
  NONE,
  DRAW,
  FINSH,
}
export const schema: RJSFSchema = {
  type: 'object',
  properties: {
    planeType: {
      enum: [PlaneEnum.XOY, PlaneEnum.YOZ, PlaneEnum.XOZ],
      default: PlaneEnum.XOY,
    },
  },
};
export const uiSchema: UiSchema = {
  planeType: {
    'ui:field': RadioButtonFields,
    'ui:options': {
      options: [
        {
          value: PlaneEnum.XOY,
          label: 'XY平面',
        },
        {
          value: PlaneEnum.YOZ,
          label: 'YZ平面',
        },
        {
          value: PlaneEnum.XOZ,
          label: 'XZ平面',
        },
      ],
    },
  },
};
